package cn.neil.springcloud.eureka;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

import java.util.Date;

/**
 * 注册中心
 *
 * @projectName: cloud-service
 * @package: com.rayeye.cloud.register
 * @className: RegisterApplication
 * @description: 注册中心
 * @author: Neil.Zhou
 * @createDate: 2018-11-19 16:49
 * @updateUser: Neil.Zhou
 * @updateDate: 2018-11-19 16:49
 * @updateRemark: The modified content
 * @version: 1.0
 * <p>Copyright: Copyright (c) 2018</p>
 */
@Slf4j
@SpringBootApplication
@EnableEurekaServer
public class EurekaRegisterApplication {
    public static void main(String[] args) {
        new SpringApplicationBuilder(EurekaRegisterApplication.class).bannerMode(Banner.Mode.OFF).run(args);
    }
    public static int getSecondTimestampTwo(Date date){
        if (null == date) {
            return 0;
        }
        String timestamp = String.valueOf(date.getTime()/1000);
        return Integer.valueOf(timestamp);
    }
}
